const path = require('path');

const resolve = dir => {
  return path.join(__dirname, dir)
}
module.exports = {
  presets: [
    '@vue/app','es2015'
  ],
  rules:[
    {
      test: /\.less$/,
      loader: "style-loader!css-loader!less-loader",
    },
    {
      test: /\.m?js$/,
      exclude: /(node_modules|bower_components)/,
      use: {
        loader: 'babel-loader',
        options: {
          presets: ['@babel/preset-env']
        }
      }
    }
  ],
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
  }
}
